package it.easycrm;

import it.easycrm.pages.CustomerPage;
import it.easycrm.pages.EventPage;
import it.easycrm.pages.LoginPage;

import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

/**
 * 
 * @author De Simone Francesco in 25/mar/2011
 *
 */
public class EasyCrmApplication extends WebApplication {
	/**
	 * Constructor
	 */
	public EasyCrmApplication() {
		mountBookmarkablePage("/login", LoginPage.class);
		mountBookmarkablePage("/ev", EventPage.class);
		mountBookmarkablePage("/customer", CustomerPage.class);
	}

	@Override
	protected void init() {
		super.init();
		addComponentInstantiationListener(getSpringInjector());

	}

	@Override
	public Class<? extends Page> getHomePage() {
		return LoginPage.class;
	}

	protected SpringComponentInjector getSpringInjector()
	{
		return new SpringComponentInjector(this);
	}
	
}
